#include <iostream>
using namespace std;
int k, g, m;
int h1, h2;
int main(){
	cin >> k >> g >> m;
	while(k--){
		if (h1 == g){
			h1 = 0;
		}
		else {
			if (h2 == 0){
				h2 = m; 
			}
			else {
				if (h2 >= g){
					h2 -= g;
					h1 = g;
				}
				else {
					h1 = h2;
					h2 = 0;
				}
			}
		}
	}
	cout << h1 << " "<< h2 << endl;

    return 0;
}


